package com.ruoyi.web.controller.business;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.constant.UserConstants;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.framework.shiro.service.SysPasswordService;
import com.ruoyi.framework.util.ShiroUtils;
import com.ruoyi.service.jpjs.project.ProjectService;
import com.ruoyi.system.domain.SysUser;
import com.ruoyi.system.domain.spider.Route;
import com.ruoyi.system.service.*;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;

/**
 * 用户信息
 *
 * @author ruoyi
 */
@Controller
@RequestMapping("/spider")
public class SpiderController extends BaseController {

    private String prefix = "business";

    @Autowired
    private IRouteService routeService;

    @GetMapping()
    @CrossOrigin
    public String list() {
        return prefix + "/spider";
    }

    @PostMapping("/list")
    @ResponseBody
    @CrossOrigin
    public TableDataInfo list(Route route) {
        startPage();
        List<Route> list = routeService.selectRouteList(route);



        return getDataTable(list);
    }

}